home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2002 November / SGI IRIX 6.5 Applications 2002 November.iso / dist / cosmocreate.idb / usr / lib / CosmoCreate / apps / bmrender.z / bmrender
Encoding:
Text File  |  1998-05-07  |  757 b   |  37 lines

  1. #!/bin/csh -f 
  2.  
  3. if ($#argv < 2) then
  4.     xconfirm -t "Error converting cosmo button file." \
  5.          -t "Converter requires 2 arguments." >& /dev/null
  6.     exit 1
  7. endif
  8.  
  9. # Handy variables
  10. set SOURCE = $argv[1]
  11. set TARGET = $argv[2]
  12. set APPDIR = /usr/lib/CosmoCreate/
  13. set RENDER = $APPDIR/apps/render
  14. set TOGIF  = $APPDIR/apps/sgitogif
  15.  
  16. # Make sure we can clobber target
  17. touch $TARGET >&/dev/null
  18. if ($status) then
  19.     xconfirm -t "Couldn't render to target file:" \
  20.          -t $TARGET \
  21.          -t "Check permissions" \
  22.          -b "OK"
  23. endif
  24.  
  25. # This tmpname could clobber another once in 
  26. # a billion years, on leap day :)
  27. set TMPNAME = $TARGET.`date +%j%H%M%S`
  28.  
  29. # Render image
  30.  
  31. $RENDER -f $SOURCE -o $TMPNAME -b -D 4 -A >& /dev/null
  32. $TOGIF  $TMPNAME $TARGET >& /dev/null
  33.  
  34. rm $TMPNAME
  35.  
  36.  
  37.